#!/bin/bash
# Description: Launch diverses Mandriva Scripts on boot.
# (c) Mandriva, Chmouel Boudjnah <chmouel@mandriva.com>
# 	$Id$	

. /etc/rc.d/init.d/functions

[ -e /etc/sysconfig/system ] && . /etc/sysconfig/system


# Globetrotter support:
#if [ -x /usr/share/harddrake/hwprofile ]; then
#    action "Starting %s: " Globetrotter /usr/share/harddrake/hwprofile
#else
	# Call netprofile as it must be called before /etc/rc.d/rc to be able to change
	# the active services.
#	if [ -x /sbin/set-netprofile ]; then
#	    INITLOG_ARGS="" action "Starting %s: " netprofile /sbin/set-netprofile
#	fi
#fi

HARDDRAKE_TOOL=/usr/share/harddrake/service_harddrake
if [ "$HARDDRAKE_ONBOOT" != "no" ] && [ -x $HARDDRAKE_TOOL ]; then
    gprintf "Checking for new hardware"
    $HARDDRAKE_TOOL 2>/dev/null
    RETVAL=$?
    if [ "$RETVAL" -eq 0 ]; then
        action "" /bin/true
    else
        action "" /bin/false
    fi
fi
